<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>BFC</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            body {
                width: 100%;
                position: relative;
            }

            .left {
                width: 100px;
                height: 150px;
                float: left;
                background: rgb(139, 214, 78);
                text-align: center;
                line-height: 150px;
                font-size: 20px;
            }

            .right {
                /*方法一：令宽度减去前者的宽度
                width: calc(100% - 100px);
                float: left;*/
                /*方法二  BFC的区域不会与float box重叠*/
                overflow: hidden;
                height: 300px;
                background: rgb(170, 54, 236);
                text-align: center;
                line-height: 300px;
                font-size: 40px;
            }
        </style>
    <body>
        <div class="left">LEFT</div>
        <div class="right">RIGHT</div>
    </body>
</html>